package com.mysterygull.aliyahcountdown;


import java.util.Date;

import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.widget.TextView;
import android.widget.DatePicker;
import android.view.View;
import android.view.View.OnClickListener;



public class AliyahCountdownActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        twoDates();
        
    }

    public void refreshScreen(View view){
    	twoDates();
    }
    
    public void twoDates(){
    	
    	TextView textview = (TextView) findViewById(R.id.textView1);
    	textview.setText("");
        DatePicker Dateview2 = (DatePicker) findViewById(R.id.DatePicker1);
        //TextView textview3 = (TextView) findViewById(R.id.textView3);
        DatePicker Dateview3 = (DatePicker) findViewById(R.id.DatePicker2); 
        Dateview3.init(2013, 6, 12, null);
        Date rightNow=new Date();
        DateDifferent datediff=new DateDifferent();
        String sTheDiff= datediff.WhatsTheDiff(Dateview3.getYear(), Dateview3.getMonth(), Dateview3.getDayOfMonth(), rightNow.getHours(), rightNow.getMinutes(), rightNow.getSeconds(), Dateview2.getYear(), Dateview2.getMonth(), Dateview2.getDayOfMonth());
        //String sNow = rightNow.getMonth() + "/" + rightNow.getDay() + "/" + rightNow.getYear();
        //String sMove = "7/12/2013";
        //textview2.setText(sNow);
        textview.setText(sTheDiff);
    }
	
    
}